import request from '@/utils/request'

const supplier = {
  getSupplierListAPI: function (params) {
    return request({
      url: '/eims/purchase/supplier/list',
      method: 'post',
      data: params
    })
  },
  addSupplierAPI: function (params) {
    return request({
      url: '/eims/purchase/supplier/add',
      method: 'post',
      data: params
    })
  },
  updateSupplierAPI: function (params) {
    return request({
      url: '/eims/purchase/supplier/update/' + params.id,
      method: 'put',
      data: params
    })
  },
  deleteSupplierAPI: function (id) {
    return request({
      url: '/eims/purchase/supplier/delete/' + id,
      method: 'delete',
      data: {}
    })
  }
}

export default supplier
